from org.apache.xmlrpc import *
from java.lang import *
from java.util import *
from java.io import *

HOST = '10.0.0.2'
PORT = 9000
url = 'http://%s:%d' % (HOST, PORT)
client = XmlRpcClient(url)

equation = r'$\sum_{i=1}^{10} \sin x \, dx$'
args = Vector()
args.add(String(equation))
result = client.execute('texer', args)
FileOutputStream('equation.pdf').write(result)


